| Conditions | 2 |
| Total Lines | 14 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 2.0625 |
| Changes | 0 | ||
| 1 | import React from 'react'; |
||
| 25 | |||
| 26 | render() { |
||
| 27 | 3 | if (this.state.hasError) { |
|
| 28 | 1 | return ( |
|
| 29 | <div className="error-handler"> |
||
| 30 | <h1>Oops! This is awkward :S</h1> |
||
| 31 | <p>It seems that something went wrong. Try refreshing the page or just click this button.</p> |
||
| 32 | <br /> |
||
| 33 | <Button outline color="primary" onClick={() => location.reload()}>Take me back</Button> |
||
| 34 | </div> |
||
| 35 | ); |
||
| 36 | } |
||
| 37 | |||
| 38 | 2 | return this.props.children; |
|
| 39 | } |
||
| 43 |